function RunOnce()
{
    var x=document.getElementById('rightcolum1');
    alert(x.innerHTML);
}

function ChangeDate(myDate)
{
    var msg_fit="";
    var msg_unfit="";

    //alert(myDate);

    $.get('testcall.php?year='+(myDate.getYear()+1900)+'&&month='+(myDate.getMonth()+1)+"&&day="+myDate.getDate(),function(data)
    {
        //var t = setTimeout(RunOnce,1000);
        //alert(data);
        eval("var data ="+data);
        //alert(data.con);
        //alert(data.pla);

        if("note" in data)
        {
            //alert(data.note);
        }

        var count = 0;

        for(var i=0; i<data.con.length; i++)
        {
            if (data.con[i]=='1' )
            {
                if ( data.pla[count]=='1' )
                {
                    msg_fit+=makestr(jsondata[i].context,jsondata[i].fit);
                }
                else
                {
                    msg_unfit+=makestr(jsondata[i].context,jsondata[i].unfit);
                }
                count ++;
            }
        }
        var x=document.getElementById('rightcolum1');
        x.innerHTML = msg_fit;



        x=document.getElementById('rightcolum2');
        x.innerHTML = msg_unfit;
    })
}

function TestZuHe()
{

    var myDate = new Date();
    ChangeDate(myDate);
    //x.innerHTML=makestr(jsondata[1].context)+makestr(jsondata[1].fit);
}

function OnInput(event)
{
    var x = document.getElementById("datepick");
    //alert(x.value);
    var ms = Date.parse(x.value);
    var myDate = new Date();
    myDate.setTime(ms);

    ChangeDate(myDate);
}

function OnProChange(event)
{
    alert("onprochange");
}
